package com.heima.user.controller.v1;

import com.heima.user.service.AuthService;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("api/v1/auth")
public class AuthController {

    @Autowired
    private AuthService authService;

    @PostMapping("/list")
    public ResponseResult getList(@RequestBody Map<String,Integer> map){
        return authService.getList(map);
    }

    /**
     * 审核通过
     * @param map
     * @return
     */
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody Map<String,String> map){
        return authService.authFail(map);
    }

    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody Map<String,String> map){
        return authService.authPass(map);
    }
}
